package model;

/**
 * 书籍类，继承自 Resource，添加作者属性。
 */
public class Book extends Resource {
    private final String author;



    public Book(String id, String title, String author) {
        super(id, title);
        this.author = author;
    }


    public String getAuthor() {
        return author;
    }


    @Override
    public String toString() {
        return String.format("Book [ID: %s, Title: %s, Author: %s, Available: %b]",
                getId(), getTitle(), author, isAvailable());
    }
}

